var path = require('path');

module.exports = {
  entry: './main.js',
  output: {
    path: path.resolve(__dirname, 'dist'),
    filename: 'foo.bundle.js'
  },
  module: {
	  rules: [
	    {
	      test: /\.js$/,
	      exclude: /(node_modules|bower_components)/,
	      loader: 'babel-loader',
	      query: {
	        presets: ['es2015','react']
	      }
	    },
	    {
	        test: /\.css$/,
	        use: [
	          { loader: 'style-loader'},
	          {
	            loader: 'css-loader'
	          }
	        ]
	     },
	     {
	        test: /\.(png|jpg|gif|svg)$/i,
	        use: [
	          {
	            loader: 'url-loader',
	            options: {
	              limit: 8192
	            }
	          }
	        ]
	     },
	     {
	        test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/,
	        loader: 'url-loader',
	        options: {
	          limit: 10000
	        }
	      }
	  ]
	},
devServer: {
  contentBase: path.join(__dirname, "dist"),
  compress: true,
  port: 9000,
  inline:true
}
};